package com.nx.samuel.dubbo_spi.impl;

import com.nx.samuel.dubbo_spi.api.Car;
import org.apache.dubbo.common.URL;

public class GreeCar  implements Car {

    // 注入
    private Car car;
    //SPIEctensionFactory Adaptive
    public void  setCar(Car car){
        this.car = car;
    }

    @Override
    public void getColor() {
        System.out.println("this is gree color");
        car.getColor();
    }

    @Override
    public void getColorForUrl(URL url) {
        System.out.println("this car finished ioc"+car.getClass());
        car.getColorForUrl(url);
    }
}
